﻿<?php    
header('Content-Type:application/json');    
require 'dbConfig.php';

$id=$_GET["id"];

// 创建连接
$conn = new mysqli($servername, $username, $password, $dbname);

$conn->query("SET NAMES utf8");

// Check connection
if ($conn->connect_error) {
    die("连接失败: " . $conn->connect_error);
}

$sql = "SELECT * FROM wp_config where id=".$id;
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    // 输出数据
    while($row = $result->fetch_assoc()) {
        echo $row["json"];
    }
} else {
    echo "0 结果";
}
$conn->close();
?>
